﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VoiceAI;
using VoiceAI.VoiceResponse;
using Windows.Data.Json;
using Xiaowei.Services;

namespace Xiaowei.ResponseHandlers
{
    internal static class SaleHelpResponseHandler
    {

        public static void Handle(IResponseData responseData)
        {
            if (responseData is ISaleHelpResponseData saleHelpResponseData)
            {
                Models.SaleHelpModel saleHelpModel = new Models.SaleHelpModel();
                saleHelpResponseData.ResponseText = saleHelpModel.TTSText;
                saleHelpResponseData.TTSUrl = XiaoweiAI.Instance.RequestTTS(saleHelpModel.TTSText);
                saleHelpResponseData.DataContext = saleHelpModel;
            } 
            
            DefaultResponseHandler.Handle(responseData);
        }



    }
}
